From 203d0da9d659d1894f1c9842575d150a48a30185 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 5 Dec 2016 22:54:11 -0800 Subject: [PATCH] Upload sha256 sums of cargo artifacts --- .travis.yml | 6 ++++++ appveyor.yml | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1b23028de..db5a62333 100644 --- a/.travis.yml +++ b/.travis.yml @@ -133,6 +133,12 @@ before_deploy: - mkdir -p deploy/$TRAVIS_COMMIT - cp target/$TARGET/release/dist/cargo-*-$TARGET.tar.gz deploy/$TRAVIS_COMMIT + - > + if [ "$TRAVIS_OS_NAME" == "osx" ]; then + find "deploy/$TRAVIS_COMMIT" -maxdepth 1 -type f -exec sh -c 'shasum -a 256 -b "{}" > "{}.sha256"' \;; + else + find "deploy/$TRAVIS_COMMIT" -maxdepth 1 -type f -exec sh -c 'sha256sum -b "{}" > "{}.sha256"' \;; + fi deploy: - provider: s3 diff --git a/appveyor.yml b/appveyor.yml index ee076135b..488c2dee8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -53,9 +53,10 @@ after_test: - ps: New-Item -Path "target/${env:TARGET}/release" -ItemType "directory" -Force - ps: New-Item -Path "target/${env:TARGET}/release/dist" -ItemType "directory" -Force - ps: Get-ChildItem -Path target\${env:TARGET}\release\dist -Filter '*.tar.gz' | Move-Item -Destination ${env:APPVEYOR_REPO_COMMIT} + - ps: Get-FileHash .\${env:APPVEYOR_REPO_COMMIT}\* | ForEach-Object {[io.file]::WriteAllText($_.Path + ".sha256", $_.Hash.ToLower() + "`n")} artifacts: - - path: $(APPVEYOR_REPO_COMMIT)\cargo-*-$(TARGET).tar.gz + - path: $(APPVEYOR_REPO_COMMIT)\cargo-* name: cargo deploy: -- 2.30.2